<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>领养订单</title>
    <link rel="stylesheet" href="../../plugins/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../plugins/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="../../css/adopt/indexCss.css" type="text/css">
    <style>
        .layui-form-label {
            text-align: center;
        }

        #welcome {
            font-size: 30px;
            background: rgba(225, 225, 225, 0.2);
            height: 100px;
            line-height: 100px;
            text-align: center;
        }
    </style>
</head>

<body>

<!-- 导航栏 -->
<ul class="layui-nav" id="header">
    <div class="container">
        <li class="layui-nav-item"><a href="/MagicFrog/index.html"><b style="font-size: 20px;">膜蛤猫舍</b></a></li>
        <li class="layui-nav-item layui-this"><a href="/MagicFrog/views/foster/foster.html">寄养猫咪</a></li>
        <li class="layui-nav-item"><a href="/MagicFrog/views/adopt/adoptCat.html">领养猫咪</a></li>
        <li class="layui-nav-item"><a href="/MagicFrog/views/personal/aboutus.html">关于我们</a></li>
        <ul class="navbar-right">
            <li class="layui-nav-item">
                <a href="/MagicFrog/views/personal/personal-center.html">个人中心</a>
            </li>
            <li class="layui-nav-item" lay-unselect="">
                <a href="/MagicFrog/views/personal/personal-center.html"><img src="//t.cn/RCzsdCq" class="layui-nav-img">我</a>
                <dl class="layui-nav-child">
                    <dd><a href="#">修改信息</a></dd>
                    <dd><a href="#">安全管理</a></dd>
                    <dd><a href="#">退了</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="#contactus">联系我们</a></li>
        </ul>
    </div>
</ul>

    <!-- 填写领养表 -->
    <div class="container">

        <div>
            <h3 id="welcome">请填写领养表哦,然后就能把猫咪带回家了~!</h3>
        </div>

        <form class="layui-form" action="">

            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                <legend>填写姓名</legend>
            </fieldset>

            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">姓名</label>
                    <div class="layui-input-block">
                        <input type="text" name="userName" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                <legend>填写手机号</legend>
            </fieldset>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">手机号</label>
                    <div class="layui-input-block">
                        <input type="tel" name="phone" lay-verify="required|phone" autocomplete="off"
                            class="layui-input">
                    </div>
                </div>
            </div>

            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                <legend>填写邮箱</legend>
            </fieldset>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">邮箱</label>
                    <div class="layui-input-block">
                        <input type="text" name="email" lay-verify="email" autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                <legend>填写身份证</legend>
            </fieldset>
            <div class="layui-form-item">
                <label class="layui-form-label">身份证</label>
                <div class="layui-input-block">
                    <input type="text" name="identity" lay-verify="identity" placeholder="请输入身份证" autocomplete="off"
                        class="layui-input">
                </div>
            </div>

            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                <legend>选择领养的时间</legend>
            </fieldset>
            <div class="layui-form-item">
                <label class="layui-form-label">日期</label>
                <div class="layui-input-block">
                    <input type="text" name="date" id="date" lay-verify="date" placeholder="yyyy-MM-dd"
                        autocomplete="off" class="layui-input">
                </div>
            </div>

            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                <legend>选择性别</legend>
            </fieldset>
            <div class="layui-form-item">
                <label class="layui-form-label" style="text-align: center">性别</label>
                <div class="layui-input-block">
                    <input type="radio" name="sex" value="男" title="男" checked="">
                    <input type="radio" name="sex" value="女" title="女">
                </div>
            </div>

            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                <legend>选择取猫的方式</legend>
            </fieldset>
            <div class="layui-form-item">
                <label class="layui-form-label">取猫方式</label>
                <div class="layui-input-block">
                    <input type="radio" name="adopt" value="到店自取" title="到店自取" checked="">
                    <input type="radio" name="adopt" value="店家配送" title="店家配送">
                </div>
            </div>

            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                <legend>填写地址(如果选择到店自取此处可以不用填)</legend>
            </fieldset>
            <div class="layui-form-item">
                <label class="layui-form-label">地址</label>
                <div class="layui-input-block">
                    <input type="text" name="title" lay-verify="title" autocomplete="off" placeholder="如果选择到店自取此处可以不用填"
                        class="layui-input">
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button type="submit" class="btn btn-default" lay-submit="" lay-filter="demo1">立即提交</button>
                    <button type="reset" class="btn btn-default">重置</button>
                </div>
            </div>

        </form>
    </div>

    <!-- 底部 -->
    <div class="container">
        <div>
            <h3 id="welcome">联系我们</h3>
        </div>
        <div class="col-md-4">
            <h4>
                <i class="	glyphicon glyphicon-map-marker"></i>&nbsp;&nbsp;Location
            </h4>
            <p>345 Setwant natrer,</p>
            <p>Metropolitan, Italy.</p>
        </div>
        <div class="col-md-4">
            <h4>
                <i class="glyphicon glyphicon-earphone"></i>&nbsp;&nbsp;PHONE
            </h4>
            <p>+1(401) 1234 567.</p>
            <p>+1(804) 4261 150.</p>
        </div>
        <div class="col-md-4">
            <h4>
                <i class="glyphicon glyphicon-envelope"></i>&nbsp;&nbsp;E-MAIL
            </h4>
            <p>
                <a href="mailto:info@example.com">Example1@gmail.com</a>
            </p>
            <p>
                <a href="mailto:info@example.com">Example2@gmail.com</a>
            </p>
        </div>
    </div>

    <script src="../../plugins/bootstrap/js/bootstrap.min.js"></script>
    <script src="../../plugins/jquery/jquery.min.js"></script>
    <script src="../../plugins/layui/layui.js" charset="utf-8"></script>
    <script>
        layui.use(['form', 'layedit', 'laydate'], function () {
            var form = layui.form
                , layer = layui.layer
                , layedit = layui.layedit
                , laydate = layui.laydate;

            //日期
            laydate.render({
                elem: '#date'
            });
            laydate.render({
                elem: '#date1'
            });

            //创建一个编辑器
            var editIndex = layedit.build('LAY_demo_editor');

            //自定义验证规则
            form.verify({
                title: function (value) {
                    if (value.length < 5) {
                        return '标题至少得5个字符啊';
                    }
                }
                , pass: [
                    /^[\S]{6,12}$/
                    , '密码必须6到12位，且不能出现空格'
                ]
                , content: function (value) {
                    layedit.sync(editIndex);
                }
            });

            //监听指定开关
            form.on('switch(switchTest)', function (data) {
                layer.msg('开关checked：' + (this.checked ? 'true' : 'false'), {
                    offset: '6px'
                });
                layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
            });

            //监听提交
            form.on('submit(demo1)', function (data) {
                layer.alert(JSON.stringify(data.field), {
                    title: '最终的提交信息'
                })
                return false;
            });

            //表单赋值
            layui.$('#LAY-component-form-setval').on('click', function () {
                form.val('example', {
                    "username": "贤心" // "name": "value"
                    , "password": "123456"
                    , "interest": 1
                    , "like[write]": true //复选框选中状态
                    , "close": true //开关状态
                    , "sex": "女"
                    , "desc": "我爱 layui"
                });
            });

            //表单取值
            layui.$('#LAY-component-form-getval').on('click', function () {
                var data = form.val('example');
                alert(JSON.stringify(data));
            });

        });
    </script>
</body>

</html>